<p class="title">advanced-code.org</p>
<p>Turns out there&#8217;s more way to do code than just BEGIN_EXAMPLE.</p>
<h1><span class="heading-number heading-number-1">1</span> Inline examples</h1>
<p>This should work:</p>
<pre class="example">
  fixed width? how does this work?   
                        ...........
                       ............
                                  .
                       .  .   .   .
                       .          ..
                       ....... .....
                           .  .
                           ....
</pre>
<p>Two ASCII blobs.</p>
<h1><span class="heading-number heading-number-1">2</span> BEGIN_SRC</h1>
<p>And this:</p>
<pre class="src" lang="ruby">
# Finds all emphasis matches in a string.
# Supply a block that will get the marker and body as parameters.
def match_all(str)
  str.scan(@org_emphasis_regexp) do |match|
    yield $2, $3
  end
end
</pre>
<p>Now let&#8217;s test case-insensitive code blocks.</p>
<pre class="src" lang="ruby">
# Finds all emphasis matches in a string.
# Supply a block that will get the marker and body as parameters.
def match_all(str)
  str.scan(@org_emphasis_regexp) do |match|
    yield $2, $3
  end
end
</pre>
<pre class="src" lang="clojure">
(def fib-seq
  (concat
   [0 1]
   ((fn rfib [a b]
        (lazy-cons (+ a b) (rfib b (+ a b)))) 0 1)))
 
user&gt; (take 20 fib-seq)
(0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597 2584 4181)
</pre>
<p>Even if no language is set, it is still wrapped in code tags but class is empty.</p>
<pre class="src">
echo &#39;Defaults env_keeps=&quot;http_proxy https_proxy ftp_proxy&quot;&#39; | sudo tee -a /etc/sudoers
</pre>
<h1><span class="heading-number heading-number-1">3</span> It should be possible to write a colon at the beginning of an example</h1>
<blockquote>
  <p>I really love to write about
    :symbols. They sure are the
    best things in the world!</p>
</blockquote>
<pre class="src" lang="ruby">
{
:one =&gt; 1,
:two =&gt; 2
}
</pre>
<pre class="src" lang="clojure">
(defproject helloworld &quot;0.1&quot;
:dependencies [[org.clojure/clojure
                 &quot;1.1.0-master-SNAPSHOT&quot;]
              [org.clojure/clojure-contrib
                 &quot;1.0-SNAPSHOT&quot;]]
:main helloworld)
</pre>
